package ua.races.dao;

import ua.races.vo.Bet;
import ua.races.vo.Client;
import ua.races.vo.Race;

import java.sql.SQLException;
import java.util.List;

public interface UserDao {

    /**
     * Returns list of all races client can bet on
     *
     * @return list of all races client can bet on
     * @throws SQLException if something goes wrong
     */
    List<Race> findAllRacesForBet() throws SQLException;

    /**
     * Adds new client's bet
     *
     * @param bet - bet that client want to add
     * @return 1 if operation completed successful
     * @throws SQLException if something goes wrong
     */
    int addNewBet(Bet bet) throws SQLException;

    /**
     * Returns all previous bets of concrete client
     * @param client - client
     * @return List ob bets of concrete client
     * @throws SQLException if something goes wrong
     */
    List<Bet> findAllClientBets(Client client) throws SQLException;
}
